\hypertarget{class_opencv_sf_m_1_1_point_of_view}{
\section{OpencvSfM::PointOfView Class Reference}
\label{class_opencv_sf_m_1_1_point_of_view}\index{OpencvSfM::PointOfView@{OpencvSfM::PointOfView}}
}


This class represent the 3D position of the device which take the pictures. The role of the class is to store everything related to the filed of view: picture, 3D position, points, matches and 3D points.  




{\ttfamily \#include $<$PointOfView.h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_opencv_sf_m_1_1_point_of_view_a296c28b5a2c8412a62ae3a7752a2c850}{PointOfView} (cv::Ptr$<$ \hyperlink{class_opencv_sf_m_1_1_camera}{Camera} $>$ device, cv::Mat rotation=cv::Mat::eye(3, 3, CV\_\-64F), cv::Vec3d translation=cv::Vec3d(0.0, 0.0, 0.0))
\item 
virtual \hyperlink{class_opencv_sf_m_1_1_point_of_view_aff68fe7602ebc6effa817860cea983f7}{$\sim$PointOfView} (void)
\item 
cv::Ptr$<$ \hyperlink{class_opencv_sf_m_1_1_camera}{Camera} $>$ \hyperlink{class_opencv_sf_m_1_1_point_of_view_ae5de2e16eac553ea1e1e7501e009bbbd}{getIntraParameters} () const 
\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_opencv_sf_m_1_1_point_of_view_a4593900dcb330a47fdb5a7a1c4e2ad93}{
cv::Mat \hyperlink{class_opencv_sf_m_1_1_point_of_view_a4593900dcb330a47fdb5a7a1c4e2ad93}{rotation\_\-}}
\label{class_opencv_sf_m_1_1_point_of_view_a4593900dcb330a47fdb5a7a1c4e2ad93}

\begin{DoxyCompactList}\small\item\em Rotation matrix R. \end{DoxyCompactList}\item 
\hypertarget{class_opencv_sf_m_1_1_point_of_view_a9ffbc9dc46273ab30f752c303b5c9848}{
cv::Vec3d \hyperlink{class_opencv_sf_m_1_1_point_of_view_a9ffbc9dc46273ab30f752c303b5c9848}{translation\_\-}}
\label{class_opencv_sf_m_1_1_point_of_view_a9ffbc9dc46273ab30f752c303b5c9848}

\begin{DoxyCompactList}\small\item\em Translation vector t. \end{DoxyCompactList}\item 
\hypertarget{class_opencv_sf_m_1_1_point_of_view_a920f9386c300582a19e68908654d169c}{
cv::Mat \hyperlink{class_opencv_sf_m_1_1_point_of_view_a920f9386c300582a19e68908654d169c}{projection\_\-matrix\_\-}}
\label{class_opencv_sf_m_1_1_point_of_view_a920f9386c300582a19e68908654d169c}

\begin{DoxyCompactList}\small\item\em redundancy but speed improvement \end{DoxyCompactList}\item 
\hypertarget{class_opencv_sf_m_1_1_point_of_view_a83bfd58fd1074d5950dad2be9630dbf8}{
cv::Ptr$<$ \hyperlink{class_opencv_sf_m_1_1_camera}{Camera} $>$ \hyperlink{class_opencv_sf_m_1_1_point_of_view_a83bfd58fd1074d5950dad2be9630dbf8}{device\_\-}}
\label{class_opencv_sf_m_1_1_point_of_view_a83bfd58fd1074d5950dad2be9630dbf8}

\begin{DoxyCompactList}\small\item\em intra parameters and distortion coefs \end{DoxyCompactList}\item 
\hypertarget{class_opencv_sf_m_1_1_point_of_view_ac644fc5f92709b33a31ee2370365f104}{
unsigned char \hyperlink{class_opencv_sf_m_1_1_point_of_view_ac644fc5f92709b33a31ee2370365f104}{config\_\-}}
\label{class_opencv_sf_m_1_1_point_of_view_ac644fc5f92709b33a31ee2370365f104}

\begin{DoxyCompactList}\small\item\em This attribut is used to know what we should estimate... If equal to 0, nothing should be estimated... \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This class represent the 3D position of the device which take the pictures. The role of the class is to store everything related to the filed of view: picture, 3D position, points, matches and 3D points. 

We use the so-\/called pinhole camera model. That is, a scene view is formed by projecting 3D points into the image plane using a perspective transformation. Usual notation says that a point \mbox{[}u,v\mbox{]} from an image is related to the point \mbox{[}X,Y,Z\mbox{]} using the following notation : \[ s \begin{bmatrix} u \\ v \\ 1 \end{bmatrix} = \begin{bmatrix}f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} r_{11} & r_{12} & r_{13} & t_1 \\ r_{21} & r_{22} & r_{23} & t_2 \\ r_{31} & r_{32} & r_{33} & t_3 \end{bmatrix} \begin{bmatrix} X \\ Y \\ Z \\ 1 \end{bmatrix} \]

This leads to the following relation between local coordinates and global ones: \[ \begin{array}{l} \vspace{10pt} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = R \begin{bmatrix} X \\ Y \\ Z \end{bmatrix} + t \\ x' = x/z \\ y' = y/z \vspace{10pt} \end{array} \] 

Definition at line 42 of file PointOfView.h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_opencv_sf_m_1_1_point_of_view_a296c28b5a2c8412a62ae3a7752a2c850}{
\index{OpencvSfM::PointOfView@{OpencvSfM::PointOfView}!PointOfView@{PointOfView}}
\index{PointOfView@{PointOfView}!OpencvSfM::PointOfView@{OpencvSfM::PointOfView}}
\subsubsection[{PointOfView}]{\setlength{\rightskip}{0pt plus 5cm}OpencvSfM::PointOfView::PointOfView (
\begin{DoxyParamCaption}
\item[{cv::Ptr$<$ {\bf Camera} $>$}]{device, }
\item[{cv::Mat}]{rotation = {\ttfamily cv::Mat::eye(3,~3,~CV\_\-64F)}, }
\item[{cv::Vec3d}]{translation = {\ttfamily cv::Vec3d(0.0,0.0,0.0)}}
\end{DoxyParamCaption}
)}}
\label{class_opencv_sf_m_1_1_point_of_view_a296c28b5a2c8412a62ae3a7752a2c850}
To create a point of view, we need two things : a camera, and a point (with orientation). Here we give an address of a \hyperlink{class_opencv_sf_m_1_1_camera}{Camera}, and the file name of the picture. If we have more informations, we can use the last parameters... 
\begin{DoxyParams}{Parameters}
{\em device} & address of existing \hyperlink{class_opencv_sf_m_1_1_camera}{Camera}. This camera can be calibrated or not... \\
\hline
{\em rotation} & Matrix of the known rotation (optional)... \\
\hline
{\em translation} & Vector of the known translation (optional)... \\
\hline
\end{DoxyParams}


$<$Rotation matrix R

$<$Translation vector t 



Definition at line 14 of file PointOfView.cpp.

\hypertarget{class_opencv_sf_m_1_1_point_of_view_aff68fe7602ebc6effa817860cea983f7}{
\index{OpencvSfM::PointOfView@{OpencvSfM::PointOfView}!$\sim$PointOfView@{$\sim$PointOfView}}
\index{$\sim$PointOfView@{$\sim$PointOfView}!OpencvSfM::PointOfView@{OpencvSfM::PointOfView}}
\subsubsection[{$\sim$PointOfView}]{\setlength{\rightskip}{0pt plus 5cm}OpencvSfM::PointOfView::$\sim$PointOfView (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_opencv_sf_m_1_1_point_of_view_aff68fe7602ebc6effa817860cea983f7}
Destructor of \hyperlink{class_opencv_sf_m_1_1_point_of_view}{PointOfView}, release all vectors... TODO: define how we should release the vectors... 

Definition at line 31 of file PointOfView.cpp.



\subsection{Member Function Documentation}
\hypertarget{class_opencv_sf_m_1_1_point_of_view_ae5de2e16eac553ea1e1e7501e009bbbd}{
\index{OpencvSfM::PointOfView@{OpencvSfM::PointOfView}!getIntraParameters@{getIntraParameters}}
\index{getIntraParameters@{getIntraParameters}!OpencvSfM::PointOfView@{OpencvSfM::PointOfView}}
\subsubsection[{getIntraParameters}]{\setlength{\rightskip}{0pt plus 5cm}cv::Ptr$<${\bf Camera}$>$ OpencvSfM::PointOfView::getIntraParameters (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_opencv_sf_m_1_1_point_of_view_ae5de2e16eac553ea1e1e7501e009bbbd}
use this function to get acces to the camera parameters \begin{DoxyReturn}{Returns}
camera matrix 
\end{DoxyReturn}


Definition at line 71 of file PointOfView.h.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/PointOfView.h\item 
D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/PointOfView.cpp\end{DoxyCompactItemize}
